package com.hopu.oa.service.mail;

import com.hopu.oa.entity.mail.AoaMailnumber;
import com.hopu.oa.entity.mail.Inmaillist;
import com.hopu.oa.entity.mail.Mailreciver;
import com.hopu.oa.entity.mail.Pagemail;
import com.hopu.oa.entity.management.AoaStatusList;
import com.hopu.oa.entity.management.AoaTypeList;
import com.hopu.oa.entity.plan.AttachmentList;
import com.hopu.oa.entity.process.AoaAttachmentList;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface mailService {
    List<Mailreciver> findByReadAndDelAndReciverId(Integer isRead, Integer isDel, Integer mailReciverId);

    List<Inmaillist> findByPushAndDelAndMailUserid(Integer bo, Integer isDel, Integer userId);

    List<Mailreciver> findByDelAndReciverId(Integer b, Integer userId, String userName);

    List<Pagemail> recive(@Param("find") String find, @Param("page") Integer page, @Param("size") Integer size, @Param("userId") Integer userId);

    //发件箱
    List<Pagemail> send(@Param("find") String find, @Param("page") Integer page, @Param("size") Integer size, @Param("userId") Integer userId);

    //草稿箱
    List<Pagemail> draft(@Param("find") String find, @Param("page") Integer page, @Param("size") Integer size, @Param("userId") Integer userId);

    //垃圾箱
    List<Pagemail> trashCan(@Param("find") String find, @Param("page") Integer page, @Param("size") Integer size, @Param("userId") Integer userId, String userName);

    Mailreciver findbyReciverIdAndmailId(Integer userId, Integer id);

    int setDel(Integer isDel, Integer mailId);

    int saveDel(Integer isDel, Integer mailId);

    Inmaillist selectByMailId(Integer mailId);

    int saveRead(Integer isRead, Integer mailId);

    AttachmentList selectAttachmentListByFileId(Integer attachmentId);

    List<AoaMailnumber> selectAoaMailnumberSend(Integer userId);

    List<AoaTypeList> selectTypeList();

    List<AoaStatusList> selectStatusList();

    Pagemail WriteAttachmentListByFileId(Integer Id);

    int sendEmail(Inmaillist inmaillist);

    int sendReciver(Mailreciver mailreciver);

    int updateEmail(Integer mailId);

    Mailreciver selectByMailreciverbyMailId(Integer mailId, Integer userId);

    AoaAttachmentList selectAoaAttachmentListById(Integer attachmentId);

    int saveShouDel(Integer isDel, Integer mailId, Integer userId);

    int deletEmail(Integer mailId);

    int statEmail(Integer star, Integer mailId);

    int isRead(Integer userId, Integer mailId, Integer isRead);

    List<AoaMailnumber> selectAoaMailnumber(Integer userId);


}
